package com.thug.dao;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.thug.bo.Customer;

public class CustomerDao extends HibernateDaoSupport {

	private static final Log LOGGER = LogFactory.getLog(CustomerDao.class);

	public Customer get(int id) throws Exception {
		
		LOGGER.info("get customer");
		return (Customer) getHibernateTemplate().get(Customer.class, id);
	}

	public void update(Customer customer) throws Exception {
		
		LOGGER.info("update customer");
		getHibernateTemplate().update(customer);
	}
}
